﻿using System;
using System.Diagnostics;
using Newtonsoft.Json;

namespace TvHeadend.Api
{
	[DebuggerDisplay("{ServiceName}({Name})")]
	public class Mux
	{
		[JsonProperty("uuid")]
		public Guid? Id { get; set; }
		[JsonProperty("iptv_url")]
		public string Url { get; set; }
		[JsonProperty("iptv_interface")]
		public string Interface { get; set; }
		[JsonProperty("iptv_atsc")]
		public bool ATSC { get; set; }
		[JsonProperty("iptv_svcname")]
		public string ServiceName { get; set; }
		[JsonProperty("enabled")]
		public bool Enabled { get; set; }
		[JsonProperty("network")]
		public string Network { get; set; }
		[JsonProperty("name")]
		public string Name { get; set; }
		[JsonProperty("onid")]
		public int OriginalNetworkId { get; set; }
		[JsonProperty("tsid")]
		public int TransportStreamId { get; set; }
		[JsonProperty("initscan")]
		public bool InitScan { get; set; }
		[JsonProperty("num_svc")]
		public int NumberOfServices { get; set; }
		[JsonProperty("charset")]
		public string CharacterSet { get; set; }
		public int ChannelNumber { get; set; }

		public string DisplayString
		{
			get { return string.Format("{0} ({1})", ServiceName, Url); }
		}
	}
}